<template>
  <Poptip :placement="placement" :width="width" :transfer="true" :trigger="trigger">
    <slot></slot>
    <Table :columns="columns" :data="data" :max-height="200" size="small" border slot="content"></Table>
  </Poptip>
</template>

<script>
  export default {
    name: 'poptipTable',
    props: {
      columns: {
        type: Array,
        default: function() {
          return [];
        }
      },
      data: {
        type: Array,
        default: function() {
          return [];
        }
      },
      placement: {
        type: String,
        default: 'right'
      },
      trigger:{
        type:String,
        default:'click'
      },
      width: String | Number
    }
  }
</script>